1. Field of the Invention
This invention relates to a micro-controller used for controlling data-transfer between a main electric device such as a personal computer and a peripheral device such as a printer or a display-panel, more particularly to a micro-controller for transferring data between a main electric and a peripheral device by using an universal serial bus.
2. Description of the Related Art
A computer system includes a main electric device (called as a host, hereinafter) such as a personal computer (PC) for processing several kinds of information and several kinds of peripheral devices such as printers and  display-panels. In the computer system, a desired process can be performed by transferring information between the host and peripheral devices.
In recent years, the popularity of some portable electric devices such as digital cameras or memory cards has increased dramatically. By connecting these portable electric devices as a peripheral devices to a PC, information stored in these portable electric devices can be processed in the PC. However, once the PC is turned on, the PC does not recognize the connection with the peripheral devices while the PC is in operation, even if the peripheral devices are connected to the PC. Therefore, it is necessary to turn the PC off and to turn on the PC again for initializing all settings of the PC in order to recognize the connection with peripheral devices.
To avoid these complicated operations, a universal serial bus (USB) is widely used for performing the interface between the host and the peripheral devices easily. When a peripheral device, having a micro-controller of the USB specification acting as a transfer control device, is connected to the PC, the PC recognizes it even if the connection has been made while the PC is activated. Therefore, it is not necessary to turn the PC off, and information stored in the peripheral device can be transferred to the PC through the USB.
The transfer control device of the USB specification includes an USB control unit and a micro-controller (MC) unit. The USB control unit sends data to the host or receives data from the host though a USB connector, which connects the peripheral device to the host. The MC unit receives data from an internal circuit in the peripheral device and sends data to the internal circuit through an I/O port, which is forming an interface with the internal circuit. The MC unit also controls the USB control unit and the internal circuit as a main control unit.
There are several types of the transfer control device. One of them is a separating-type transfer control device; the other is an incorporating-type transfer control device. The separate-type transfer control device includes a first semiconductor device functioning as the USB control unit and a second semiconductor device functioning as the MC unit, wherein the first and second semiconductor devices are mounted on a single circuit board. The incorporating-type transfer control device include a single semiconductor device having the USB control unit and the MC unit formed on a single semiconductor chip. In these devices, although under the USB 1.1 standard, the USB control unit should be operated by a clock signal having a 48 MHz frequency, the particular frequency of the clock signal used to operate the MC unit is not regulated. Therefore, the MC unit may be operated by a clock signal having a 48 MHz frequency, which is the same frequency as that of the clock signal operating the USB control unit. Further, it is possible to use a clock signal for the MC unit whose frequency is higher than that of the clock signal for the USB control unit when high speed operation is required. On the other hand, the frequency of the clock signal for the MC unit can be lower than that of the clock signal for the USB control unit when low power consumption is required.
In recent years, peripheral devices of low power consumption have been required. To meet this requirement, the MC unit has a function, performed in what may be called a stop mode, for halting its operation, and the USB control unit has a function, performed in what may be called a suspend mode, for halting its operation as well as a stop mode while no communication has been made between the host and the peripheral device.
As described above, in the separate-type transfer control device, each of the first and second semiconductor devices has an oscillating circuit for outputting the oscillation signal generated by an external oscillator. That is, one oscillating circuit is used for the USB control unit, and the other oscillating circuit is used for the MC unit. As does the separate-type transfer control device, the incorporating-type transfer control device has two oscillating circuits for the USB control unit and the MC unit respectively in the single semiconductor device. The reason why these transfer control devices require two oscillating circuits is described below.
On some occasions, the MC unit should be operated when the USB control unit is in the suspend mode, or the USB control unit should be operated when the MC unit is in the stop mode. Therefore, even if one of the units is halted, the clock signal should be sent to the other unit. That is the reason why each unit should have an oscillating circuit. However, the electric power consumed by the oscillating circuit is not negligible small. Further, when there is a phase difference between the clock signals generated by each oscillating circuit, this phase difference cause an operation gap between the USB control unit and the MC unit. Therefore, it is necessary to adjust the operation gap. Furthermore, the cost of the oscillating circuit is not cheap so that the cost of the transfer control unit is also increased. Therefore, the technology for sharing the oscillating circuit between the USB control unit and the MC unit is essential.
However, if the single oscillating circuit is simply used commonly for the USB control unit and the MC unit, the following problems may occur. If the operation of the co-used oscillating circuit is halted completely in response to operation in one of the low power consumption modes, which are the suspend mode of the USB control unit and the stop mode of the MC unit, the MC unit can not perform any process or the USB control unit can not receive any data from the host. Therefore, the operation of the co-used oscillating circuit can not be halted completely in response to operation in one of the low power consumption modes. On the other hand, when the co-used oscillating circuit is normally operated regardless the low power consumption modes of the USB control unit and of the MC unit, power consumption will be increased so that the benefit of the low power consumption of the transfer control device can not be expected. Further, in a BUS-POWERED method ruled in the USB standard that power for the micro-controller in the peripheral device receives from the host through the USB, it is difficult to operate the oscillating circuit all the time because of the current flow restriction of the USB control unit in the suspend mode. Specifically, the low power consumption for the portable electric device whose power is supplied from batteries is highly required because the micro-controller as the transfer control device is installed therein. That is, the increase of the power consumption on the micro-controller should be avoided.